package com.atguigu.financial.realtime.common.base;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @Date: 2024/1/8 20:32
 * @Description:
 */
public abstract class BaseApp {
    public abstract void handle(StreamExecutionEnvironment env, DataStreamSource<String> stream);
    public void start(int port, int parallelism, String groupId, String topic){
        // TODO 1. 环境准备
        // 1.1 设置操作Hadoop的用户名为Hadoop超级用户atguigu
        System.setProperty("HADOOP_USER_NAME", "atguigu");
        // 1.2 获取流环境
        // TODO 2. 执行具体的处理逻辑

        // TODO 3. 执行Job
    }
}
